{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 决策边界"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from matplotlib import pyplot as plt\n",
    "from sklearn import datasets\n",
    "iris = datasets.load_iris()\n",
    "X = iris.data\n",
    "y = iris.target\n",
    "X = X[y<2,:2]\n",
    "y = y[y<2]\n",
    "# plt.scatter(X[y==0, 0], X[y==0, 1], color='r')\n",
    "# plt.scatter(X[y==1, 0], X[y==1, 1], color='b')            #横纵坐标都是特征，而输出颜色是其分类结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from playML.model_selection import train_test_split\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, seed=666)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LogisticRegression()"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from playML.LogisticRegression import LogisticRegression\n",
    "log_reg = LogisticRegression()\n",
    "log_reg.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 3.01796521, -5.04447145])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "log_reg.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.6937719272911228"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "log_reg.intercept_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def x2(x1):         #传来的x1,根据之前逻辑回归的结果，求出对应的x2值\n",
    "    return (-log_reg.coef_[0] * x1 - log_reg.intercept_) / log_reg.coef_[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "x1_plot = np.linspace(4, 8, 1000)       #4-8 横轴\n",
    "x2_plot = x2(x1_plot)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x98ab946a48>]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3deXhU5fXA8e8hYQurLAoYkoDsqCggiqggoCgitta2KlbF+qMVrValoqVVodJqRWtd0KIWtVBr1WohbMomiIKAiErCEtaEfd8CWc/vjxkqhmRmkpk7987M+TzPPJm5c+/cM5fh5Oa95z0jqooxxpjYV83tAIwxxkSGJXRjjIkTltCNMSZOWEI3xpg4YQndGGPiRLJbO27SpIlmZGS4tXtjjIlJy5cv36OqTct7zrWEnpGRwbJly9zavTHGxCQR2VzRczbkYowxccISujHGxAlL6MYYEycsoRtjTJywhG6MMXHCEroxxsQJS+jGGBMnLKEbY0yUFBSX8Mon61m+eb8jr+/axCJjjEkUqsrs7F08MS2LzXvzuavPWXRLPy3i+7GEbowxDlq38zBjMrNYuG4PbU6vy5t39KB3u3Jn7ofNEroxxjjgYH4Rf5m9ln8s3kydGkk8dm0nbrkonepJzo10W0I3xpgIKilV3v5iC898tIaDx4q4qUcaD1zRjsZ1azq+b0voxhgTIYs37OXxKatYveMwF7ZqxKPXdqJziwZR278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0L2a/XwGT/X+qbwCGeuB4hRKXW8cLEUkBrgB+cdIy149ZCHFF/Zip6hIReQ/fcE8xsAKY4GQOs6n/xhgTJzw75GKMMaZyLKEbY0ycsIRujDFxwhK6McbECUvoxhgTJyyhG2NMnLCEbowxceL/AXwdf6iDPspgAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X[y==0,0], X[y==0,1], color='r')\n",
    "plt.scatter(X[y==1,0], X[y==1,1], color='b')\n",
    "plt.plot(x1_plot, x2_plot)                     #新来的值，乘以theta，大于0 则红色区域，小于0 则蓝色区域； =0 则都可以"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x98ab987148>]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3dd3xUVf7/8ddJqKGXUEMIvYWgEEBQUQEVAVEEV3ax62JdXffrUsSCINZV17XxQ10XFddCAiIqVkRURINKGi1A6D2QACGkzPn9MdHFmJAQZubembyfj0cezNx7mfl4De+c3Dnnc421FhERCX5hThcgIiK+oUAXEQkRCnQRkRChQBcRCREKdBGREFHNqTdu2rSpjYmJcertRUSC0sqVK/dZayNL2+dYoMfExJCUlOTU24uIBCVjzOay9umSi4hIiFCgi4iECAW6iEiIUKCLiIQIBbqISIhQoIuIhAgFuohIiFCgi4gESEGRhxe+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6z46UtAHz/X9Mv77ij+cw/ea4j9Shzy6/kqFsXvfwUMeF3W2hxr7eHixx8C1Y0xTf1c1jZgm7V2RfHzeXiDtOQxgT5f5dbl0Pk63kXAj9ba3aXsc+R7rFiZdTl0zoYCm6y1e621BUAiMLDEMT7NMNcGurV2irU2ylobg/fXqC+stSV/ui0Eril+PLb4GL+OBipSV4lrhqPwfnjqV8aYOsaYer88Bi4AUkscthC4ungmwhl4fwXc6XRdxpgWv1w3NMb0w/t9ud+fdVlrdwFbjTFdijcNAdJLHBbw81WRupw4XyX8kbIvawT8nFWkLofO2RbgDGNMRPF7D+H3WeDTDAuGWS6/YYyZDiRZaxfi/eDodWNMBt6fauNcUtcdxphRQGFxXdcGoITmwPzi79lqwJvW2sXGmJsBrLWzgA+B4UAGkAtc55K6xgK3GGMKgaPAOH//YC72F2Bu8a/qG4HrXHC+KlKXU+cLY0wEcD5w03HbHD9nFagr4OfMWrvCGDMP7+WeQuAnYLY/M0xL/0VEQoRrL7mIiMjJUaCLiIQIBbqISIhQoIuIhAgFuohIiFCgi4iECAW6iEiI+P+szSnyy4nYiwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X_test[y_test==0,0], X_test[y_test==0,1], color='r')   #测试点分布\n",
    "plt.scatter(X_test[y_test==1,0], X_test[y_test==1,1], color='b')\n",
    "plt.plot(x1_plot, x2_plot)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 不规则决策边界"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_decision_boundary(model, axis):    \n",
    "    x0, x1 = np.meshgrid(\n",
    "        np.linspace(axis[0], axis[1], int((axis[1]-axis[0])*100)).reshape(-1, 1),          #x y 轴细分\n",
    "        np.linspace(axis[2], axis[3], int((axis[3]-axis[2])*100)).reshape(-1, 1),\n",
    "    )\n",
    "    X_new = np.c_[x0.ravel(), x1.ravel()]\n",
    "\n",
    "    y_predict = model.predict(X_new)\n",
    "    zz = y_predict.reshape(x0.shape)\n",
    "\n",
    "    from matplotlib.colors import ListedColormap\n",
    "    custom_cmap = ListedColormap(['#EF9A9A','#FFF59D','#90CAF9'])\n",
    "    \n",
    "    plt.contourf(x0, x1, zz, cmap=custom_cmap)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x98aba7e948>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAcTElEQVR4nO3dcYxd5Xnn8e/D2Gu7ZIx3QgiW7dSKIKhaNuCA3EZeJSzJrhqCTCWo8IosEKXytmpIaFKhUktkhcQf2ZWqpGGVyAnL2kk2TWPSroNItUQJm8A2VMZQCHETubsE7BgMOOAxHbyM/ewf914zc+beue+9855z3nPe30eymDn3+NznHpvHZ977O881d0dERNrvrLoLEBGRaqjhi4hkQg1fRCQTavgiIplQwxcRyYQavohIJoIbvplNmNnjZnZ/n8duNrMXzeyJ7q/fi1umiIgs1bIR9v0kcABYPeDxb7r7x5dekoiIlCHoCt/M1gMfBr5SbjkiIlKW0Cv8zwG3AZOL7HOtmb0P+DnwR+7+XHEHM9sObAc4e8WKyy48//wRyxURydsTv/jFS+7+tnF+79CGb2ZXA0fd/TEzu2LAbt8BvuHuJ83s94FdwJXFndx9J7ATYNPGjf6DHTvGqVlEJFv/fPv2X4z7e0OWdLYA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C7DVzJ4B/gK40sy+VtjnELABwMyWAeeQznTOofW7+8vufrL77ZeBy6otcXHu/svuf4/SWQPcXNjlzPnvWk9nCF7thtWe+FiPQ8Ahd3+0+/0eOg20uE+S556A+hM//z0fAva7+wt9Hkv5/PcMrH+c819qw3f32919vbtvpPNjyffd/SOF3fYCN3W/vq67TxL/yobUX1jz20rnzd0kmNnZZjbZ+xr4t0BxQule4MZuYuG3gFfd/UjFpS4QUrslPNbD3Z8HnjOz3mTDDwA/LeyW5LmHsPpTPv9z/DsGL4cke/7nGFj/OOe/qpTOPGZ2J7DP3ffSeVPoq2Z2kM6V/bY6ahpFof5PmNlWYJZO/TfXWVvB24G/6v6dWAb8d3f/GzP7fTgzGuMB4CrgIPBPwEdrqrUopPZxx3pU5Rbg690fy/8P8NGGnPueYfUnff7N7NeAfwP8hznbGnP+A+of+fxrtIKISCZ0p62ISCbU8EVEMqGGLyKSCTV8EZFMqOGLiGRCDV9EJBNq+CIimfj/VaZNnfFKP0AAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_decision_boundary(log_reg, axis=[4, 7.5, 1.5, 4.5])\n",
    "plt.scatter(X[y==0,0], X[y==0,1])\n",
    "plt.scatter(X[y==1,0], X[y==1,1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### kNN决策边界\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n",
       "                     metric_params=None, n_jobs=None, n_neighbors=5, p=2,\n",
       "                     weights='uniform')"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.neighbors import KNeighborsClassifier\n",
    "knn_clf = KNeighborsClassifier()\n",
    "knn_clf.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.0"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "knn_clf.score(X_test, y_test)      #准确度100%"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x98acd74608>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAc2UlEQVR4nO3df4xdZ33n8fc3M157GsaxnB/Ysk0tFIgq0iQmllvkClJCV02InEoJIquwSRDIBUFISlHU1JKRIuUPdqUuaZBAJtmsDZSlOLRrIlM1CLKQbAlynBATDMjdhdhmEic2scfpxM2Mv/vHvXcyc+beuc+99znnPOeez0sa5c65x+d+77HznWee8znPNXdHRESG3zllFyAiIsVQwxcRqQk1fBGRmlDDFxGpCTV8EZGaUMMXEamJ4IZvZiNm9rSZPdLmudvM7CUze6b59dG4ZYqIyKBGe9j3DuAgsLzD899w908OXpKIiOQhaIRvZmuB9wMP5FuOiIjkJXSE/3ngLmB8kX1uMLN3A78E/sLdD2d3MLOtwFaAc5cuvfJtq1b1WK6ISMPxsfPLLqEUh3++/2V3v7CfP9u14ZvZdcAxd3/KzK7qsNu3ga+7+xkz+xiwE3hvdid33wHsANiwfr1/f9u2fmoWkZpacfMI9z33obLLKNWdm5b+ut8/GzLC3wxsMbNrgWXAcjP7qrvPnnV3Pz5n/y8Dn+u3IB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sdnd30nj19dPmNm7M88ne/7pXvt+4Hfd/XLgfuAfiy5wEaPAO4EvuvsG4FXgrzL7pHzuQ+pP+fwD0JyK2gJ8s93Tbbalcv6BrvX3fP7zHuFvBraY2a+A/wm818y+mtnnCLAOwMxGgfNIZ3XOrvW7+3F3P9P89svAlcWWuDh3/03zv8dozAFuyuwye/6b1tJYBK903WpPfFmPI8ARd3+y+f1uGg00u0+S556A+hM//y3XAPvd/cU2z6V8/ls61t/P+c+14bv73e6+1t3X0/i15Hvu/qHMbnuAW5uPb2zuk8RP2ZD6M3N+W2hc3E2CmZ1rZuOtx8B/BLIrlO4BbmkmFv4QOOnuEwWXukBI7Zbwsh7u/gJw2MxaKxteDfwss1uS5x7C6k/5/M/xn+g8HZLs+Z+jY/39nP+iUjrzmNk9wD5330PjotBXzOwQjZH9TWXU1ItM/Z8ysy3ANI36byuztow3A//Q/DcxCvydu/+TmX0MZpfG2AtcCxwC/g34cEm1ZoXU3u+yHkW5Hfha89fy/wt8uCLnvqVb/UmffzP7HeBPgD+fs60y5z+g/p7Pv5ZWEBGpCd1pKyJSE2r4IiI1oYYvIlITavgiIjWhhi8iUhNq+CIiNaGGLyJSE/8fQ9/C+blnIagAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_decision_boundary(knn_clf, axis=[4, 7.5, 1.5, 4.5])\n",
    "plt.scatter(X[y==0,0], X[y==0,1])\n",
    "plt.scatter(X[y==1,0], X[y==1,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n",
       "                     metric_params=None, n_jobs=None, n_neighbors=5, p=2,\n",
       "                     weights='uniform')"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "knn_clf_all = KNeighborsClassifier()\n",
    "knn_clf_all.fit(iris.data[:, :2], iris.target)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x98ae906308>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3df5BddZnn8ffT3SFpkk4iP0ICAcMUjD9ADZLKMGTGFXQtSRigBFa2wAHLkRlr1DgzO7PLxAKkZC3LrZnJ6I5TUXdFcR0lMoSRYDGOuCosUAkgJrbOZIyQkE7CD0O6Q4J0+tk/7r2d7tP39vnee849P/p8XlVd9D3n3HOee+g8/e3vec5zzN0REZGZryfvAEREJBtK+CIiFaGELyJSEUr4IiIVoYQvIlIRSvgiIhURnPDNrNfMnjCzbzdZd4OZPWdmT9a//iDdMEVEJKm+NrZdCwwC81us/4a7fzh5SCIi0g1BI3wzWwqsAb7Y3XBERKRbQkf4fwP8BTAwzTZXmtnbgH8F/sTdd0U3MLMbgRsB5s6eff7Zixe3Ga6IJPVC/4l5hyAJ7PrZ48+7+8mdvDc24ZvZpcB+d99qZm9vsdk/AV9391fM7I+AO4CLoxu5+wZgA8B5y5b5g+vWdRKziHRg4bW9rN9+Xd5hSEIfWzn76U7fGzKlswq4zMx+CfwDcLGZ3TlxA3d/wd1fqb/8AnB+pwGJSHco2Utswnf3m9x9qbsvA64Bvufuk35yzGzJhJeXUbu4KyIFccfy6/MOQQqgnSqdSczsNmCLu98LfNTMLgNGgReBG9IJT0SSUrKXhrYSvrt/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ASwIWnuVGsFEZGK0J22IiIVoYQvIlIRSvgiIhWhhC8iUhFK+CIiFaGELyJSEUr4IiIV8f8BbAd4/YqxRm0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_decision_boundary(knn_clf_all, axis=[4, 8, 1.5, 4.5])\n",
    "plt.scatter(iris.data[iris.target==0,0], iris.data[iris.target==0,1])\n",
    "plt.scatter(iris.data[iris.target==1,0], iris.data[iris.target==1,1])\n",
    "plt.scatter(iris.data[iris.target==2,0], iris.data[iris.target==2,1])    #不规则，过拟合了   n_neighbors=5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x98adef3288>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3df5CUhZ3n8fd3phEQBtEoDooG9zRGpVQiRYxcconmUgEssaJu3DLZmMouu6nVYLJXqXNJqbHipXJ3tRtWq5KguYvGXKKiKyaAZbxoGeXUAkWDGXVJ/AEygIoDwwhqT3/vj+4eZprueZ7ufvrp5+nn86qacuZ5nnn624/Dd555+tPfx9wdERHpfF3tLkBEROKhhi8ikhFq+CIiGaGGLyKSEWr4IiIZoYYvIpIRoRu+mXWb2bNm9psq6640szfNbFPp42+iLVNERJqVq2PbZUAfMK3G+rvc/armSxIRkVYIdYZvZrOAxcBtrS1HRERaJewZ/g+BbwM942xziZl9Cng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esb7u3hnHJZ0fAt8GCjXWHw9sBXD3PLAH+FAMdVUKqhPgktKfoqvM7ISY6qrkwENmttGKoyoqjRzPkm2lZXELqhPgE2b2nJmtM7Mz4iwO+AvgTeB/ly7j3WZmUyq2ScKxDFMntPdYVroc+GWV5Uk4nqPVqhPafDzd/Q3gfwKvA/3AHnd/qGKzuntnSxu+mV0I7HL3jeNtVmVZrFnRkHX+Gpjt7mcCD3PwN2vcFrj7xyj+efwPZvapivVtP54lQXU+A3zY3c8Cbgbuj7m+HPAx4EfuPhcYAv5rxTZJOJZh6mz3sRxRuuR0EXBPtdVVlrUlFx5QZ9uPp5kdSfEM/iTgOGCKmX2pcrMq3zru8Wz1Gf4C4CIzexX4FXC+mVXeIXkbcAJA6U+XI4h/Omdgne7+tru/V/ryVuCceEscqWN76b+7KF57nF+xycjxLJnFoX8KtlxQnQkYybEN2ObuT5W+XkWxsVZu0+5jGVhnAo7laAuBZ9x9Z5V1STieZTXrTMjx/Czwiru/6e4fAPcB51VsU3fvbGnDd/dr3X2Wu8+m+OfT79y98rfUA8BXSp9fWtom1t/6YeqsuNZ4EcUXd2NlZlPMrKf8OfA5Dp04+gDw16VExLkU/xTsT1qd1uaRHO6+A9hqZqeWFl0A/LFis7YfyzB1tvtYVvgral8mafvxHKVmnQk5nq8D55rZ4aVaLuDQnlN374wrpTOGmd0IbHD3Byi+GPVzM9tC8bfT5e2oqZqKOr9hZhcBeYp1XtmGko4F/q30s5gD/o+7P2hmfw8joy7WAouALcC7wFcTWmejIzmidDXwi9Kf938GvprAYxmmziQcS8zscOA/A383alnijmeIOtt+PN39KTNbRfHyUh54FljZbO/UaAURkYzQO21FRDJCDV9EJCPU8EVEMkINX0QkI9TwRUQyQg1fRCQj1PBFRDLi/wOePY5v1mEuUwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "knn_clf_all = KNeighborsClassifier(n_neighbors=50)\n",
    "knn_clf_all.fit(iris.data[:,:2], iris.target)\n",
    "\n",
    "plot_decision_boundary(knn_clf_all, axis=[4, 8, 1.5, 4.5])\n",
    "plt.scatter(iris.data[iris.target==0,0], iris.data[iris.target==0,1])\n",
    "plt.scatter(iris.data[iris.target==1,0], iris.data[iris.target==1,1])\n",
    "plt.scatter(iris.data[iris.target==2,0], iris.data[iris.target==2,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
